﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Kaskelot.SP.Model.Contracts;
using Kaskelot.SP.Services;
using Stockholm.SOA.Kaskelot.WCF.DataContracts;

namespace Kaskelot.SP.UI.CONTROLTEMPLATES.Kaskelot.SP.UI.Forms
{
	public partial class ValkretsForm : BaseForm, IForm
	{
		public string Id { get; set; }
		public string ParentId { get; set; }
		public Valkrets Current { get; set; }

		protected void Page_Load(object sender, EventArgs e)
		{
			using (AdminService svc = new AdminService())
			{
				if(!String.IsNullOrEmpty(Id))
				{
					Current = svc.GetValkrets(new Guid(Id));
				}
				else
				{
					Current = new Valkrets();
				}
			}
		}
	}
}
